//
//  SEOnlineReserveHospitalCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/6.
//

import UIKit

class SEOnlineReserveHospitalCell: UITableViewCell {

    func update(with viewModel: SEInquiryInfoViewModel) {
        hospitalLabel.text = viewModel.doctorDetail.hospitalName
        ratingLabel.text = viewModel.doctorDetail.hospitalJb
        ratingLabelWidthConstraint.constant = viewModel.hospitalRatingLabelWidth(ratingLabel) 
        goodAtLabel.text = viewModel.doctorDetail.speciality
    }
    
    @IBOutlet private var ratingLabelWidthConstraint: NSLayoutConstraint!
    
    @IBOutlet private weak var hospitalLabel: UILabel!
    @IBOutlet private weak var ratingLabel: UILabel! {
        didSet {
            ratingLabel.layer.cornerRadius = 2
            ratingLabel.layer.borderWidth = 1
            ratingLabel.layer.borderColor = UIColor(hex: "#FFB32D").cgColor
        }
    }
    @IBOutlet private weak var goodAtLabel: UILabel!
}
